﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Conqueror.WP.Model;
using Conqueror.WP.Utility;
using Microsoft.Phone.Tasks;

namespace Conqueror.WP
{
    public partial class SettingsPage : PhoneApplicationPage
    {
        public SettingsPage()
        {
            InitializeComponent();
        }

        private void LogoutUser(object sender, RoutedEventArgs e)
        {
            User.Username = "";
            User.Save();
            NavigationService.Navigate(new Uri("/LoginPage.xaml", UriKind.Relative));
        }

        private void DonateToConqueror(object sender, RoutedEventArgs e)
        {
            WebBrowserTask task = new WebBrowserTask();
            task.Uri = new Uri("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=68359Z28AV4YG", UriKind.Absolute);
            task.Show();
        }
    }
}